/**
 * 
 */
package com.ubo.visu.model;

/**
 * @author saludegu
 * 
 */
public class MemberAttribute {

	/**
	 * Visibilité de l'attribut.
	 */
	protected String mVisibility;

	/**
	 * Type de l'attribut.
	 */
	protected String mType;

	/**
	 * Nom de l'attribut.
	 */
	protected String mName;
	
	/**
	 * Modifiers de l'attribut.
	 */
	protected String[] mModifiers;

	/**
	 * Constructor
	 * 
	 * @param mVisibility
	 * @param mType
	 * @param mName
	 */
	public MemberAttribute(String mVisibility, String mType, String mName, String...tabModifiers) {
		super();
		this.mVisibility = mVisibility;
		this.mType = mType;
		this.mName = mName;
		this.mModifiers = tabModifiers;
	}

	/**
	 * 
	 * Constructor
	 * 
	 */
	public MemberAttribute() {

	}

	/**
	 * @return the mVisibility
	 */
	public String getVisibility() {
		return mVisibility;
	}

	/**
	 * @return the mType
	 */
	public String getType() {
		return mType;
	}

	/**
	 * @return the mName
	 */
	public String getName() {
		return mName;
	}

	/**
	 * @param mVisibility
	 *            the mVisibility to set
	 */
	public void setVisibility(String mVisibility) {
		this.mVisibility = mVisibility;
	}

	/**
	 * @param mType
	 *            the mType to set
	 */
	public void setType(String mType) {
		this.mType = mType;
	}

	/**
	 * @param mName
	 *            the mName to set
	 */
	public void setName(String mName) {
		this.mName = mName;
	}

	/**
	 * 
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		if(mModifiers==null)
			return mVisibility + " " + mType + " " + mName;
		else {
			StringBuffer buffer = new StringBuffer();
			buffer.append(mVisibility+" ");
			for(String s : mModifiers) {
				buffer.append(s+" ");
			}
			buffer.append(mType + " " + mName);
			return buffer.toString();
		}
	}

}
